ViRC Whiteboard Interface Jesse McGrew June 15, 2001 Introduction ============ ViRC 2's whiteboard is extremely powerful from a scripter's perspective. A script can create whiteboard windows, draw in them, react to drawing done either locally or remotely, selectively ignore drawing commands, or change commands before they are drawn or sent. Whiteboard windows ================== Whiteboard windows are similar to DCC chat windows. They have unique numeric names such as =!5, and non-unique names such as =!Mr2001. ViRC automatically creates whiteboard windows for DCC whiteboard connections. Scripts can create them with the $NewWhiteboard() function: @ $wboard = $NewWhiteboard($title) The supplied title will appear in the window's caption, and if it's a single word it can be used as the window's non-unique name (=!title). The function returns the window's unique name. Drawing and manipulating the window =================================== Commands marked *** are NOT IMPLEMENTED in 2.0pre8. Colors (, , etc.) can be given as hex RGB numbers ($bbggrr), their decimal equivalents, or cl* color constants (clRed, clBlue, etc. - not ecNotice, ecChanText). Tool types are 0 for pencil, 1 for line, 3 for rectangle, 4 for ellipse, 5 for filled rectangle, 6 for filled ellipse, 8 for eraser, 9 for flood fill, 10 for arrow, and 11 for rubber stamp. Begin recording to a file: Whiteboard =!nick record End recording: Whiteboard =!nick norecord Play back a recorded file: Whiteboard =!nick play Save the canvas to a bitmap: Whiteboard =!nick save Load the canvas from a bitmap: (note: the loaded bitmap will not be sent over a DCC whiteboard connection) Whiteboard =!nick load Save the canvas to the clipboard: Whiteboard =!nick savetoclipboard Load the canvas from the clipboard: (note: see above) Whiteboard =!nick loadfromclipboard Draw with a tool: Whiteboard =!nick dr Clear the canvas: Whiteboard =!nick cls Draw unstyled text in the default font: Whiteboard =!nick txt Draw styled text: (note: